﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.SM
{
    /// <summary>
    /// 生命附加意外门急诊医疗保险
    /// </summary>
    class Class11
    {
        /// <summary>
        /// 意外门急诊医疗费用保险金给付
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.SchemePeriodActing.InsurantStates.Contains("意外门急诊医疗"))
            {
                da.Value = ppa.Amount;
                da.Description = "最大支付";
            }
        }
        /// <summary>
        /// 无理赔优惠
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && !ppa.PolicyActing.PeriodActings[ppa.Period - 1].SchemePeriodActing.InsurantStates.Contains("意外门急诊医疗"))
            {
                ppa.Amount = ppa.PolicyActing.Policy.Amount * 1.2;

            }
            else
            {
                ppa.Amount = ppa.PolicyActing.Policy.Amount;
            }
        }
    }
}
